package com.ruoyi.system.api.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.api.mapper.FseLocationMapper;
import com.ruoyi.system.api.domain.FseLocation;
import com.ruoyi.system.api.service.IFseLocationService;
import com.ruoyi.common.core.text.Convert;

/**
 * FSE实时位置坐标Service业务层处理
 * 
 * @author shihx
 * @date 2020-03-04
 */
@Service
public class FseLocationServiceImpl implements IFseLocationService 
{
    @Autowired
    private FseLocationMapper fseLocationMapper;

    /**
     * 查询FSE实时位置坐标
     * 
     * @param id FSE实时位置坐标ID
     * @return FSE实时位置坐标
     */
    @Override
    public FseLocation selectFseLocationById(Long id)
    {
        return fseLocationMapper.selectFseLocationById(id);
    }

    /**
     * 查询FSE实时位置坐标列表
     * 
     * @param fseLocation FSE实时位置坐标
     * @return FSE实时位置坐标
     */
    @Override
    public List<FseLocation> selectFseLocationList(FseLocation fseLocation)
    {
        return fseLocationMapper.selectFseLocationList(fseLocation);
    }

    /**
     * 新增FSE实时位置坐标
     * 
     * @param fseLocation FSE实时位置坐标
     * @return 结果
     */
    @Override
    public int insertFseLocation(FseLocation fseLocation)
    {
        fseLocation.setCreateTime(DateUtils.getNowDate());
        return fseLocationMapper.insertFseLocation(fseLocation);
    }

    /**
     * 修改FSE实时位置坐标
     * 
     * @param fseLocation FSE实时位置坐标
     * @return 结果
     */
    @Override
    public int updateFseLocation(FseLocation fseLocation)
    {
        fseLocation.setUpdateTime(DateUtils.getNowDate());
        return fseLocationMapper.updateFseLocation(fseLocation);
    }

    /**
     * 删除FSE实时位置坐标对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFseLocationByIds(String ids)
    {
        return fseLocationMapper.deleteFseLocationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除FSE实时位置坐标信息
     * 
     * @param id FSE实时位置坐标ID
     * @return 结果
     */
    @Override
    public int deleteFseLocationById(Long id)
    {
        return fseLocationMapper.deleteFseLocationById(id);
    }
}
